package com.it.park.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.it.park.client.service.QuestionAnswerService;
import com.it.park.dao.QuestionAnswerMapper;
import com.it.park.model.QuestionAnswer;

@Service("questionAnswerService")
public class QuestionAnswerServiceImpl extends BaseServiceImpl<QuestionAnswer> implements QuestionAnswerService {
	
	@Autowired
	private QuestionAnswerMapper  questionAnswerMapper;

	@Override
	public boolean deleteByPrimaryKey(Integer id) {
		return questionAnswerMapper.deleteByPrimaryKey(id)==1;
	}

	@Override
	public boolean insert(QuestionAnswer record) {
		return questionAnswerMapper.insert(record)==1;
	}

	@Override
	public boolean insertSelective(QuestionAnswer record) {
		return questionAnswerMapper.insertSelective(record)==1;
	}

	@Override
	public QuestionAnswer selectByPrimaryKey(Integer id) {
		return questionAnswerMapper.selectByPrimaryKey(id);
	}

	@Override
	public boolean updateByPrimaryKeySelective(QuestionAnswer record) {
		return questionAnswerMapper.updateByPrimaryKeySelective(record)==1;
	}

	@Override
	public boolean updateByPrimaryKey(QuestionAnswer record) {
		return questionAnswerMapper.updateByPrimaryKey(record)==1;
	}

	@Override
	public List<QuestionAnswer> selectAll() {
		return questionAnswerMapper.selectAll();
	}

	@Override
	public List<QuestionAnswer> selectPagination(Map<String, Object> map) {
		return questionAnswerMapper.selectPagination(map);
	}

	@Override
	public Integer selectTotal(Map<String, Object> map) {
		return questionAnswerMapper.selectTotal(map);
	}

	@Override
	public List<Integer> selectByQuestionId(Integer questionId) {
		return questionAnswerMapper.selectByQuestionId(questionId);
	}

	@Override
	public QuestionAnswer selectIsExists(QuestionAnswer record) {
		return questionAnswerMapper.selectIsExists(record);
	}

	@Override
	public boolean updateByPrimaryKeyWithBLOBs(QuestionAnswer record) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public List<QuestionAnswer> selectPagination(QuestionAnswer t) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Integer selectTotal(QuestionAnswer t) {
		// TODO Auto-generated method stub
		return null;
	}

}
